﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dbPoll_Application.Models.AccountManagerModel>" %>

        <ul id="pageMenu">
            <% if (Page.User.IsInRole("System Administrator"))
               { %>
               <% if (Model.SelectedRole == "Poll Administrator")
                  { %>
               <li>Poll Administrator</li>
               <% }
                  else
                  { %>
               <li><%= Html.ActionLink("Poll Administrator", "AccountManager", "Account", new { role = "Poll Administrator" }, null)%></li>   
               <% } %>
            <% } 
               if (Page.User.IsInRole("Poll Administrator"))
               { %>
               <% if (Model.SelectedRole == "Poll Creator")
                  { %>
               <li>Poll Creator</li>
               <% }
                  else
                  { %>
               <li><%= Html.ActionLink("Poll Creator", "AccountManager", "Account", new { role = "Poll Creator" }, null)%></li>   
               <% } %>
            <% } 
               if (Page.User.IsInRole("Poll Creator"))
               { %>
               <% if (Model.SelectedRole == "Poll Master")
                  { %>
               <li>Poll Master</li>
               <% }
                  else
                  { %>
               <li><%= Html.ActionLink("Poll Master", "AccountManager", "Account", new { role = "Poll Master" }, null)%></li>   
               <% } %>
            <% } 
               if (Page.User.IsInRole("Poll Master"))
               { %>
               <% if (Model.SelectedRole == "Poll User")
                  { %>
               <li>Poll User</li>
               <% }
                  else
                  { %>
               <li><%= Html.ActionLink("Poll User", "AccountManager", "Account", new { role = "Poll User" }, null)%></li>   
               <% } %>
            <% } %>
        </ul>